<html>
<head><title>First (session)</title></head>
<body>
<jsp:useBean id="applicationVariable"
             scope="application" class="java.lang.StringBuffer" />
<jsp:useBean id="sessionVariable"
             scope="session" class="java.lang.StringBuffer" />
<jsp:useBean id="requestVariable"
             scope="request" class="java.lang.StringBuffer" />
<jsp:useBean id="pageVariable"
             scope="page" class="java.lang.StringBuffer" />
<%
    applicationVariable.append("1");
    sessionVariable.append("3");
    requestVariable.append("5");
    pageVariable.append("7");
%>
<jsp:forward page="second.jsp" />
</body>
</html>